package com.springbootblog.dao.sqlBuilder;

import com.springbootblog.pojo.Friendlink;

import java.util.Map;

public class FriendLinkSqlBuilder
{
    public String getFriendLinkList(Map<String, Object> param)
    {
        return "select * from friendlink WHERE status = 1 ";
    }

    public String getMaxSortNo()
    {
        return "select MAX(sort_no) AS number from friendlink ";
    }

    public String applyFriendLink(Friendlink friendlink)
    {
        String SQL = "INSERT INTO friendlink (friendlink,logo,friendname,addtime,sort_no) " +
                "VALUES " +
                "( '"+friendlink.getFriendlink()+"','"+friendlink.getLogo()+"','"+friendlink.getFriendname()+"',NOW(),'"+friendlink.getSortNo()+"' )";
        return SQL;
    }



}
